package org.example.springcloud.controller;

import org.example.springcloud.entity.Order;
import org.example.springcloud.service.OrderService;
import org.example.springcloud.utils.ResultVOUtil;
import org.example.springcloud.vo.ResultVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 8/2/21 9:41 AM
 * @Version: 1.0
 */
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public ResultVO create(Order order) {
        orderService.create(order);
        return ResultVOUtil.success(200, "订单创建成功");

    }


}